package P5.T7.T6;

import javax.swing.*;
import java.awt.*;

public class MyJFrame6 extends JFrame {
    public MyJFrame6() {
        setTitle("MyJFrame6");
        setSize(500,500);
        setLayout(new FlowLayout());
        String[] strs=new String[]{
                "计科",
                "信安",
                "AI"
        };
        JComboBox<String> comboBox = new JComboBox<>(strs);
        comboBox.addItem("网工");
        add(comboBox);

        setLocationRelativeTo(null);
        setVisible(true);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}
